package com.zzh.myapplication.activity;

import android.support.v7.widget.Toolbar;
import android.view.View;

import net.icarplus.car.R;
import net.icarplus.car.adapter.InvoiceCustomAdapter;
import net.icarplus.car.bean.InvoiceAdapterBean;
import net.icarplus.car.manager.BaseActivity;
import net.icarplus.car.tools.ToolBarHelper;
import net.icarplus.car.views.PinnedHeaderListView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/4/21.
 */
public class InvoiceTravelActivity extends BaseActivity {
    private PinnedHeaderListView listView;
    public List<InvoiceAdapterBean> list;
    public Toolbar toolbar;

    @Override
    public void setContent() {
        setContentView(R.layout.activity_invoice_travel);
    }

    @Override
    public void initComponent() {
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        ToolBarHelper.setNormalTitleAndBack(this, toolbar, "按行程开发票");
        listView = (PinnedHeaderListView) findViewById(R.id.listview);
        View HeaderView = getLayoutInflater().inflate(R.layout.listview_item_header, listView, false);
        listView.setPinnedHeader(HeaderView);
        list = new ArrayList<InvoiceAdapterBean>();
            list.add(new InvoiceAdapterBean("1", "2", "3", "4", "5", "6", "7"));
            list.add(new InvoiceAdapterBean("11", "22", "33", "44", "55", "66", "77"));
            list.add(new InvoiceAdapterBean("11", "22", "33", "44", "55", "66", "88"));
            list.add(new InvoiceAdapterBean("11", "22", "33", "44", "55", "99", "77"));
        InvoiceCustomAdapter adapter = new InvoiceCustomAdapter(this, list);
        listView.setAdapter(adapter);
        adapter.notifyDataSetChanged();
        listView.setOnScrollListener(adapter);
    }

    @Override
    public void setListener() {

    }

    @Override
    public void onAfterInit() {

    }

    @Override
    public void onClick(View v) {

    }


}
